package com.service.dao.constants;

import com.google.common.collect.Lists;
import lombok.Getter;

import java.util.List;

/**
 * <dl>
 * <dt>platform</dt>
 * <dd>Description:</dd>
 * <dd>Copyright: Copyright (C) 2018</dd>
 * <dd>Company: </dd>
 * <dd>CreateDate: 2019-04-06</dd>
 * </dl>
 */
public class ConfigConstants {

    /**
     * USDT资金测算，查询流水条数，type值表示误差
     */
    public static final String USDT_VERIFY = "usdt_verify";

    //网站名称
    public static final String WEB_SITE_NAME = "WEB_SITE_NAME";
    //网站标题
    public static final String WEB_SITE_TITLE = "WEB_SITE_TITLE";
    //是否升级中
    public static final String WEB_SITE_UPGRADE = "WEB_SITE_UPGRADE";

    public static final String DEFAULT_MSG_CODE = "DEFAULT_MSG_CODE";
    /**
     * 管理员收消息手机号
     */
    public static final String ADMIN_RECEIVE_MSG_MOBILE = "ADMIN_RECEIVE_MSG_MOBILE";
    /**
     * 管理员收消息手机区号
     */
    public static final String ADMIN_RECEIVE_MSG_PHONE_CODE = "ADMIN_RECEIVE_MSG_PHONE_CODE";

    public static final String SMS_VERIFY_CODE_TPL_ID = "SMS_VERIFY_CODE_TPL_ID";

    public static final String PIC_CODE_VERIFY = "PIC_CODE_VERIFY";

    /**
     * EXDF提现手续费最低扣NEXDF
     */
    public static final String WITHDRAW_FEE_MIN_EXDF = "WITHDRAW_FEE_MIN_EXDF";
    /**
     * EXDF提现手续费百分比
     */
    public static final String WITHDRAW_FEE_RATE_EXDF = "WITHDRAW_FEE_RATE_EXDF";
    /**
     * 提现:USDT每天限额
     */
    public static final String WITHDRAW_LIMIT_DAILY_USDT = "WITHDRAW_LIMIT_DAILY_USDT";
    /**
     * 提现时间限制,
     * 周末是否能操作提现
     */
    public static final String WITHDRAW_LIMIT_WEEKEND = "WITHDRAW_LIMIT_WEEKEND";
    /**
     * 提现时间限制
     * 每天9:00～18:30
     */
    public static final String WITHDRAW_LIMIT_DAY_TIME = "WITHDRAW_LIMIT_DAY_TIME";

    /**
     * 当天是否为结假日
     * 当天是否为节假日，0:上班,1:周末,2:假日,可手动设置，若无设置，则每天凌晨0点定时任务到第三方api接口获取
     */
    public static final String TODAY_IS_HOLIDAY = "TODAY_IS_HOLIDAY";

    /**
     * 有效会员消费额
     */
    public static final String VALID_MEMBER_CONSUMPTION = "VALID_MEMBER_CONSUMPTION";

    /**
     * 订单下单未支付过期时间(单位:分钟)
     */
    public static final String ORDER_OVERDUE_TIME = "ORDER_OVERDUE_TIME";

    /**
     * 发放奖励货币
     */
    public static final String AWARD_COINS_TYPE_ID = "AWARD_COINS_TYPE_ID";
    /**
     * 节点奖金比例
     */
    public static final String NODE_AWARD_RATE = "LEADER_AWARD_RATE";
    /**
     * 享受推广奖励为消费总额N倍以内
     */
    public static final String TOTAL_CONSUMPTION_MULTIPLE = "TOTAL_CONSUMPTION_MULTIPLE";
    /**
     * 奖金发放限制:小账户推荐大账户按小账户累计购买礼包金额计算推广奖励
     */
    public static final String RECOMMEND_AWARD_LIMIT_OPEN = "RECOMMEND_AWARD_LIMIT_OPEN";

    /**
     * 奖金发放限制:小账户推荐大账户按小账户累计购买礼包金额计算推广奖励
     */
    public static final String FIL_DIG_RELEASE_TIME_CONFIG = "FIL_DIG_RELEASE_TIME_CONFIG";

    /**
     * FIL算力挖矿手续费分红时间间隔配置
     */
    public static final String FIL_DIG_RELEASE_CUSTODYFEE_SHARE_TIME_CONFIG = "FIL_DIG_RELEASE_CUSTODYFEE_SHARE_TIME_CONFIG";

    /**
     * FIL算力挖矿手续费一级分红比例
     */
    public static final String FIL_DIG_RELEASE_CUSTODYFEE_SHARE_1_SCALE_CONFIG = "FIL_DIG_RELEASE_CUSTODYFEE_SHARE_1_SCALE_CONFIG";

    /**
     * FIL算力挖矿手续费二级分红比例
     */
    public static final String FIL_DIG_RELEASE_CUSTODYFEE_SHARE_2_SCALE_CONFIG = "FIL_DIG_RELEASE_CUSTODYFEE_SHARE_2_SCALE_CONFIG";

    /**
     * 购买FIL算力订单间推直推分红比例(百分比，单位:%),系统层面的奖励
     */
    public static final String PAY_FIL_ORDER_SHARE_1_SCALE = "PAY_FIL_ORDER_SHARE_1_SCALE";

    /**
     * 购买FIL算力订单间推间推分红比例(百分比，单位:%)，系统层面
     */
    public static final String PAY_FIL_ORDER_SHARE_2_SCALE = "PAY_FIL_ORDER_SHARE_2_SCALE";

    /**
     * 转账验证码配置,是否开启验证码
     */
    public static final String TRANSFER_ACCOUNT_VERIFY_CODE = "TRANSFER_ACCOUNT_VERIFY_CODE";

    /**
     * 登录图片验证码配置,是否开启验证码
     */
    public static final String IMAGE_VERIFY_CODE = "IMAGE_VERIFY_CODE";

    public static final String IMAGE_VERIFY_CODE_ADMIN = "IMAGE_VERIFY_CODE_ADMIN";

    /**
     * 转账密码配置,是否开启密码校验
     */
    public static final String TRANSFER_ACCOUNT_PASSWORD = "TRANSFER_ACCOUNT_PASSWORD";
    /**
     * OTC交易货币
     */
    public static final String OTC_COIN_TYPE_ID = "OTC_COIN_TYPE_ID";
    /**
     * OTC交易结算货币
     */
    public static final String OTC_TRADE_COIN_TYPE_ID = "OTC_TRADE_COIN_TYPE_ID";

    /**
     * otc 货币涨跌幅
     */
    public static final String OTC_PRICE_HIGHS_AND_LOWS_LIMIT = "OTC_PRICE_HIGHS_AND_LOWS_LIMIT";

    /**
     * 会员资金测算误差
     */
    public static final String MEMBER_STORE_MEASURE_ERROR_LIMIT = "MEMBER_STORE_MEASURE_ERROR_LIMIT";

    /**
     * 会员资金测算条数
     */
    public static final String MEMBER_STORE_MEASURE_NUM = "MEMBER_STORE_MEASURE_NUM";
    /**
     * 是否开启会员资金测算
     */
    public static final String MEMBER_STORE_MEASURE_OPEN = "MEMBER_STORE_MEASURE_OPEN";

    /**
     * 礼包商品购买时的结算货币
     */
    public static final String GIFT_ORDER_COINS_ID = "GIFT_ORDER_COINS_ID";
    /**
     * 礼包商品赠送货币
     */
    public static final String GIFT_ORDER_GIFT_COINS = "GIFT_ORDER_GIFT_COINS";

    /**
     * 运费结算货币
     */
    public static final String FREIGHT_COINS_ID = "FREIGHT_COINS_ID";

    /**
     * 积分商品购买时的结算货币
     */
    public static final String POINTS_ORDER_COINS_ID = "POINTS_ORDER_COINS_ID";
     /**
     * 积分商品赠送货币
     */
    public static final String POINTS_ORDER_GIFT_COINS = "POINTS_ORDER_GIFT_COINS";

    /**
     * admin页面url
     */
    public static final String ADMIN_API_URL = "ADMIN_API_URL";

    /**
     * 转账是否只能在直系之间
     */
    public static final String DIRECT_RELATIVE_TRANSFER_ACCOUNTS = "DIRECT_RELATIVE_TRANSFER_ACCOUNTS";
    /**
     * OTC交易是否只能在直系之间
     */
    public static final String DIRECT_RELATIVE_OTC_TRADE = "DIRECT_RELATIVE_OTC_TRADE";
    /**
     * EXTO基础价格
     */
    public static final String EXTO_BASE_PRICE = "EXTO_BASE_PRICE";
    /**
     * EXTO浮动价格
     */
    public static final String EXTO_FLOAT_PRICE = "EXTO_FLOAT_PRICE";
    /**
     * EXDF浮动价格
     */
    public static final String EXDF_FLOAT_PRICE = "EXDF_FLOAT_PRICE";
    /**
     * EXDF最大基础价格
     */
    public static final String EXDF_MAX_BASE_PRICE = "EXDF_MAX_BASE_PRICE";
    /**
     * EXDF最大基础浮动价格
     */
    public static final String EXDF_MAX_FLOAT_PRICE = "EXDF_MAX_FLOAT_PRICE";
    /**
     * EXDF最小基础价格
     */
    public static final String EXDF_MIN_BASE_PRICE = "EXDF_MIN_BASE_PRICE";
    /**
     * EXDF最小基础浮动价格
     */
    public static final String EXDF_MIN_FLOAT_PRICE = "EXDF_MIN_FLOAT_PRICE";
    /**
     * OTC起购数量
     */
    public static final String OTC_MIN_BUY_NUM = "OTC_MIN_BUY_NUM";
    /**
     * 全网每天最大合成份数
     */
    public static final String CONVERSION_NUM_DAILY = "CONVERSION_NUM_DAILY";
    /**
     * 每次最小合成份数
     */
    public static final String CONVERSION_NUM_MIN = "CONVERSION_NUM_MIN";
    /**
     * 每次合成倍数
     */
    public static final String CONVERSION_NUM_MULTIPLE = "CONVERSION_NUM_MULTIPLE";
    /**
     * 合成地址类型
     */
    public static final String CONVERSION_CONTRACT_ADDRESS_TYPE = "CONVERSION_CONTRACT_ADDRESS_TYPE";
    /**
     * 是否开启币币交易
     */
    public static final String TRADING_SPOT_OPEN = "TRADING_SPOT_OPEN";

    /**
     * eth节点配置
     */
    public static final String ETH_NODE_RPC = "ETH_NODE_RPC";

    /**
     * eth热钱包配置
     */
    public static final String ETH_WALLET_RPC = "ETH_WALLET_RPC";

    /**
     * 系统配置的管理员 eth 钱包地址
     */
    public static final String ETH_COINBASE = "ETH_COINBASE";


    /**
     * OMNI钱包节点
     */
    public static final String OMNI_WALLET_RPC = "OMNI_WALLET_RPC";

    /**
     * OMNI管理员钱包
     */
    public static final String BTC_OMNI_COINBASE = "BTC_OMNI_COINBASE";


    public static final String ERC20_USDT = "ERC20_USDT";

    /**
     * EXDF合约配置
     */
    public static final String EXDF_CONTRACT = "EXDF_CONTRACT";
    /**
     * 商家额度货币
     */
    public static final String MERCHANT_CREDIT_LINE_COINS = "MERCHANT_CREDIT_LINE_COINS";

    /**
     * 线下下单积分释放货币
     */
    public static final String OFFLINE_ORDER_RELEASE_COINS = "OFFLINE_ORDER_RELEASE_COINS";
    /**
     * 线下下单积分释放产生货币
     */
    public static final String OFFLINE_ORDER_RELEASE_TARGET_COINS = "OFFLINE_ORDER_RELEASE_TARGET_COINS";

     /**
     * 线下商家订单赠送货币释放比例
     */
    public static final String OFFLINE_ORDER_RELEASE_RATIO = "OFFLINE_ORDER_RELEASE_RATIO";
    
    /**
     * 线下商家订单让利比例
     */
    public static final String OFFLINE_ORDER_CONCESSION_RATIO = "OFFLINE_ORDER_CONCESSION_RATIO";
    /**
     * 线下商家订单返利比例
     */
    public static final String OFFLINE_ORDER_REBATE_RATIO = "OFFLINE_ORDER_REBATE_RATIO";
    /**
     * 线下商家订单让利货币指导价
     */
    public static final String OFFLINE_ORDER_CONCESSION_COIN_PRICE = "OFFLINE_ORDER_CONCESSION_COIN_PRICE";

    /**
     * 线下商家订单与释放货币兑换汇率
     */
    public static final String OFFLINE_ORDER_RELEASE_COINS_EXCHANGE_RATE = "OFFLINE_ORDER_RELEASE_COINS_EXCHANGE_RATE";
    /**
     * 线下商家订单与释放货币兑换货币
     */
    public static final String OFFLINE_ORDER_RELEASE_COINS_EXCHANGE_COINS = "OFFLINE_ORDER_RELEASE_COINS_EXCHANGE_COINS";

    /**
     * 线下商家订单返利货币
     */
    public static final String OFFLINE_ORDER_REBATE_COINS = "OFFLINE_ORDER_REBATE_COINS";
    /**
     * 线下商家订单给会员赠送货币
     */
    public static final String OFFLINE_ORDER_GIFT_MEMBER_COINS = "OFFLINE_ORDER_GIFT_MEMBER_COINS";

    /**
     * FIL团队：代理业绩返USDT比例
     */
    public static final String TEAM_FIL_PROXY_REWARD_SCALE = "TEAM_FIL_PROXY_REWARD_SCALE";

    /**
     * FIL团队：分公司业绩返USDT比例
     */
    public static final String TEAM_FIL_COM_REWARD_SCALE = "TEAM_FIL_COM_REWARD_SCALE";

    /**
     * 分公司业绩达标标志算力数量
     */
    public static final String FIL_TEAM_BUSINESS_MEETS_STANDARDS_COM_NUM = "FIL_TEAM_BUSINESS_MEETS_STANDARDS_COM_NUM";
    /**
     * 代理业绩达标标志算力数量
     */
    public static final String FIL_TEAM_BUSINESS_MEETS_STANDARDS_PROXY_NUM = "FIL_TEAM_BUSINESS_MEETS_STANDARDS_PROXY_NUM";

    /**
     * 订单结束后续约期限/天
     */
    public static final String ORDER_RENEW_LIMIT_DAYS = "ORDER_RENEW_LIMIT_DAYS";

    /**
     * APP版本配置
     */
    public static final String APP_UPDATE_VERSION = "APP_UPDATE_VERSION";
    /**
     * APP资源下载链接
     */
    public static final String APP_UPDATE_SOURCE_URL = "APP_UPDATE_SOURCE_URL";
    /**
     * APP版本更新提示
     */
    public static final String APP_UPDATE_MSG = "APP_UPDATE_MSG";

    /**
     * 排行奖池业绩占比
     */
    public static final String ALL_RANK_REWARD_POOL_RATE = "ALL_RANK_REWARD_POOL_RATE";

    /**
     * 本月直接奖励比例
     */
    public static final String RANK_MINING_RATE = "RANK_MINING_RATE";

    /**
     * 本月部分沉淀到下个月奖励比例
     */
    public static final String RANK_MINING_NEXT_MONTH_SEDIMENT_RATE = "RANK_MINING_NEXT_MONTH_SEDIMENT_RATE";

    /**
     * 排行总人数限制 默认8人
     */
    public static final String RANK_LIMIT_NUM = "RANK_LIMIT_NUM";
    /**
     * 矿机是否暂停
     */
    public static final String MINER_STATUS = "MINER_STATUS";

    /**
     * FIL直接释放百分比/%
     */
    public static final String FIL_DIRECT_MINING_RATE = "FIL_DIRECT_MINING_RATE";

    /**
     * FIL线性释放百分比/%
     */
    public static final String FIL_LINEAR_MINING_RATE = "FIL_LINEAR_MINING_RATE";

    /**
     * FIL线性释放默认周期/天
     */
    public static final String LINEAR_RELEASE_END_DAYS = "LINEAR_RELEASE_END_DAYS";

    /**
     * 商家FIL节点列表
     */
    public static final String MERCHANT_FIL_FOX_LIST = "MERCHANT_FIL_FOX_LIST";

    /**
     * 算力业绩提成公司手续费分红比例
     */
    public static final String COM_FEE_SHARE_RATE = "COM_FEE_SHARE_RATE";

    public enum Group {

        base(1, "系统参数设置"),
        admin(2, "管理员参数设置"),
        transfer(3, "转账参数设置"),
        award(5, "奖金参数设置"),
//        OTC(6, "场外参数设置"),
        Capital_Measurement(7, "资金测算参数设置"),//资金测算
        mall(8, "商城参数设置"),//商城相关配置
//        price(9, "货币参数设置"),//货币价格相关配置
//        conversion(10, "合成参数设置"),//货币价格相关配置
//        trading_spot(11, "币币交易"),//货币价格相关配置
        wallet(12, "钱包配置"),//钱包配置关配置
        verifyCode(13, "验证码设置"),//验证码相关配置
//        merchant(14, "链商"),//验证码相关配置
        app_update(15,"APP更新配置")
        ;

        @Getter
        private Integer code;

        @Getter
        private String name;

        Group(Integer code, String name) {
            this.code = code;
            this.name = name;
        }
    }

//    public static List<Integer> otcPriceGroup() {
//        return Lists.newArrayList(Group.OTC.code, Group.price.code);
//    }

    /**
     * 旁系转账,0关闭，1开启
     */
    public static final String TURN_OTHER_TEAM = "turn_other_team";

    public enum Value {
        ACTIVE("1"),
        INVALID("0");
        @Getter
        private String code;

        Value(String code) {
            this.code = code;
        }
    }
}
